<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数组</title>
</head>
<body>

</body>
<script>
    //定义数组
    let arr=[1,2,3,4,5,6];
    arr[6]=50;
    //遍历数组
    for (let i = 0; i < arr.length; i++) {
        document.write(arr[i]+"<br>")
    }
</script>
</html>